#include <string>
#include <stdio.h>
#include <cstring>
int main ()
{
  std::string s("Initial string");

  // constructors used in the same order as described above:
  int l = s.length();
  s[l/2] = '\0';
  printf("Initial length %d \npresent length %d \nctring length%d\n", l, s.size(),strlen(s.c_str()));
  if (s[l] == '\0')
  {
    printf("s ends with \'\\0\'\n");
  }
  return 0;
}